import java.util.Arrays;
import java.util.Scanner;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class No_6 {
    public static void main(String[] args) {
        int [] ar = {78,67,53,32,23,16};
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入要添加的成绩：");
        int[] newAr = new int[ar.length+1];
        System.arraycopy(ar,0,newAr,0,ar.length);
        for (int i = 0; i < newAr.length; i++) {
            if (newAr[i]==0){
                newAr[i] = sc.nextInt();
                break;
            }
        }
        Arrays.sort(newAr);
        System.out.println(Arrays.toString(newAr));
    }
}
